package cn.xc.org.domain;

import cn.xc.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    //部門編號
    private String sn;

    //部門名稱
    private String name;

    //部門狀態，1=開啟，0=禁用
    private Integer state;

    //上級經理關聯Id
    private Long manager_id;
    //保存上级经理
    private Employee manager;

    //上級部門關聯Id
    private Long parent_id;
    //保存上级部门
    private Department parent;

    //保存所有部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();;
}
